home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: schwarz@mips.complang.tuwien.ac.at (Konrad Schwarz)
- Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
- Subject: Re: C coding problem
- Date: 10 Apr 1996 07:11:42 -0500
- Organization: TU Wien
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4kg8hu$ij7@solutions.solon.com>
- References: <4j06na$808@solutions.solon.com> <4jttan$3gf@solutions.solon.com> <4jv6st$crf@solutions.solon.com> <4k1qh3$5hn@solutions.solon.com> <4keov7$8bk@solutions.solon.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4keov7$8bk@solutions.solon.com>, kanze@gabi-soft.fr (J. Kanze) writes:
-
- |> *Normally*, any decent compiler will convert either of these idioms to
- |> whichever is fastest on that machine, although I do have memories of a
- |> Microsoft C compiler which converted the array notation to pointers,
- |> even though on the target machine (8086, large model), it could keep the
- |> (single) index in memory, but not the pointers. (Turning off
- |> optimization resulted in a program that ran faster and was smaller.)
-
- Chris Torek's very interesting posting <4kcmji$p13@solutions.solon.com>
- indicates that gcc on SPARC is a further counter-example.
-
- |> What is obfuscation is using pointers when the original data is an array
- |> (or vice-versa).
-
- In which situations would you use pointer arithmetic?
-
- Konrad Schwarz
-